<div ng-controller="WelfareController" id="WelfareController">
    <div class="base-tool-bar pro-tool-bar">
        <div class="tool-bar-welfare">
            <button class="welfare-btn" ng-click="gotoAddWelfare()">发福利</button>
        </div>
    </div>
    <div class="base-content-main welfare-content-main">
        <div class="page-title">
            <span class="ba-en">Balance</span>
            <span class="cr-en"> Credit balance</span>
        </div>
        <div class="welfare-info-box">

            <div class="balance-box">
                <div class="balance">
                    <div class="balance-container">
                        <div class="balance-title">
                            企业余额
                        </div>
                        <div class="ba-price" ng-model="walletInfo.balance">
                            ￥{{walletInfo.balance.toFixed(2)}}
                        </div>
                        <div class="withdraw-price">
                            <span class="money-base">
                                可提现金额
                            </span>
                            <span class="money-container company-left-money-container">
                                {{walletInfo.balance - walletInfo.limitedBalance}}
                            </span>
                            <span class="rmb company-left-rmb">
                                元
                            </span>
                        </div>
                    </div>
                </div>
                <div class="balance">
                    <div class="credit-container">
                        <div class="credit-balance-title">
                            企业授信余额
                        </div>
                        <div class="ba-price">
                            ￥{{(walletInfo.creditLimit - walletInfo.creditBalance).toFixed(2)}}
                        </div>
                        <div class="credit-price">
                            <span class="money-base">
                                授信额度
                            </span>
                            <span class="money-container">
                                {{walletInfo.creditLimit}}
                            </span>
                            <span class="rmb">
                                元
                            </span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="welfare-base-box">
                <div class="rent-past-title-box">
                    <div class="rent-past-title base-info-title-en rent-box-title">
                        <p class="base-info-title-en base-line-center">Payment history</p>
                    </div>
                </div>
                <div class="base-info-content ">
                    <div>
                        <div class="rent-past-content">
                            <div class="rent-past-title-border title-border">
                                <p class="base-info-title-cn table-welfare-color rent-past-text  welfare-base-center pro-change-font ">往期福利发放记录</p>
                            </div>
                        </div>
                        <div class="rent-table-box" ng-class="{false: 'rent-hide-table-all'}[!!$parent.showAllPlanItem]">
                            <table class="rent-plan-table">
                                <thead>
                                <tr class="table-welfare-color">
                                    <th class="pro-change-font">发放日期</th>
                                    <th class="pro-change-font">发放金额</th>
                                    <th class="pro-change-font">发放人数</th>
                                    <th class="pro-change-font">人均金额</th>
                                    <th class="pro-change-font">状态</th>
                                    <th class="pro-change-font last-th">业务流水号</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr ng-repeat="planItem in welfareData">

                                    <td class="pro-change-font">{{getLocalTime(planItem.createTime)}}</td>
                                    <td class="pro-change-font">{{planItem.totalAmount}}</td>
                                    <td class="pro-change-font">{{planItem.totalCount}}</td>
                                    <td class="pro-change-font">{{planItem.totalAmount/planItem.totalCount}}</td>
                                    <td class="pro-change-font">{{getstatus(planItem.status)}}</td>
                                    <td class="pro-change-font last-th">{{planItem.id}}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="rent-all-plan-box">
                            <div class="rent-plan-back table-welfare-color" ng-click="gotoMoreWelfare()">
                                更多福利记录
                                <span class="rent-plan-down-arrow fa fa-2x" ng-class="{false: 'fa-angle-down', true: 'fa-angle-up'}[!!$parent.showAllPlanItem]"></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>